<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="/css/pintuer.css">
    <link rel="stylesheet" href="/css/admin.css">
    <script src="/js/jquery.js"></script>
    <script src="/js/pintuer.js"></script>
    <script src="/js/vuejs-2.5.16.js"></script>
    <script src="/js/axios-0.18.0.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="/element-ui/lib/index.js"></script>

</head>
<body>
<div class="panel admin-panel" id="questionnaireListDiv">
    <div class="panel-head"><strong class="icon-reorder"> 灵魂测试试卷列表</strong>
    </div>
    <table class="table table-hover text-center">
        <tr>
            <th width="5%">编号</th>
            <th width="5%">等级</th>
            <th width="10%">名称</th>
            <th width="10%">图片</th>
            <th width="10%">难度系数</th>
            <th width="25%">创建时间</th>
            <th width="25%">更新时间</th>
            <th width="310px">操作</th>
        </tr>

        <tr v-for="(questionnaire,index) in questionnaireList">

            <td style="text-align:center; padding-left:20px;">{{index+1}}</td>
            <td>{{questionnaire.level}}</td>
            <td>{{questionnaire.name}}</td>
            <td width="10%"><img :src="questionnaire.cover" alt="" width="70" height="50" /></td>
            <td>{{questionnaire.star}}</td>
            <td>{{questionnaire.created}}</td>
            <td>{{questionnaire.updated}}</td>

            <td>

            </td>
            <td>
                <div class="button-group">
                    <a class="button border-main" :href="'./question_list.html?id='+questionnaire.id"><span class="icon-edit"></span>查看</a>
                </div>
            </td>
        </tr>



        <tr>
            <td colspan="7" style="text-align:left;padding-left:20px;">
				<span>总记录数：3</span>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    const app = new Vue({
        el: '#questionnaireListDiv',
        data: {
            questionnaireList:[],
        },
        methods: {
            findList(){
                axios.get('soul/questionnaire').then(resp=>{
                    this.questionnaireList = resp.data;

                })
            }
        },
        created(){
            this.findList();
        }
    })
</script>
<script src="/js/verify.js"></script>
</body>
</html>